// VennInspector.m
// Copyright (c) 1992 by Paul Burchard.
// May be used in any form with appropriate acknowledgement.

#import <nib/InterfaceBuilder.h>
#import <appkit/appkit.h>
#import "VennInspector.h"
#import "Venn.h"

@implementation VennInspector

+ finishLoading:(struct mach_header *)header 
{
    NIBDidLoadClass(self, header);
    return nil;
}

+ startUnloading 
{
    NIBWillUnloadClass(self);
    return nil;
}

- init
{
    [super init];
    [NXApp loadNibSection:"VennInspector.nib" owner:self];
    return self;
}

- revert:sender
{
    [window endEditingFor:self];
    [borderWidthField setFloatValue:[object borderWidth]];
    [firstTitleField setStringValue:[object firstTitle]];
    [secondTitleField setStringValue:[object secondTitle]];
    [vennState setState:[object state]];
    return [super revert:sender];
}

- ok:sender
{
    [window endEditingFor:self];
    [object setBorderWidth:[borderWidthField floatValue]];
    [object setFirstTitle:[firstTitleField stringValue]];
    [object setSecondTitle:[secondTitleField stringValue]];
    [object setState:[vennState state]];
    return [super ok:sender];
}


@end

